package com.eshop.gen.service;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.ResponseEntity;
import com.eshop.gen.domain.GenConfig;
import org.springframework.scheduling.annotation.Async;
import com.eshop.gen.domain.ColumnConfig;
import java.util.List;

public interface GeneratorService
{
    Object getTables(final String name, final Integer page, final Integer size);
    
    List<ColumnConfig> getColumns(final String name);
    
    @Async
    void sync(final List<ColumnConfig> columnInfos, final List<ColumnConfig> columnInfoList);
    
    void save(final List<ColumnConfig> columnInfos);
    
    Object getTables();
    
    void generator(final GenConfig genConfig, final List<ColumnConfig> columns);
    
    ResponseEntity<Object> preview(final GenConfig genConfig, final List<ColumnConfig> columns);
    
    void download(final GenConfig genConfig, final List<ColumnConfig> columns, final HttpServletRequest request, final HttpServletResponse response);
    
    List<ColumnConfig> query(final String table);
}
